<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Utility%>
<%namespace System.Collections.Generic%>
<!--header end-->

<!--TheCurrent start-->
<div id="foruminfo">
	
	<div class="userinfo">
		<h2><a href="{Config.WebsiteUrl}" class="home">{Config.WebsiteTitle}</a>
			  <span><a href="usercp.aspx">用户中心</a></span>
			  <strong>治疗信息</strong>
		</h2>
	</div>
	
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
	
</div>
<!--TheCurrent end-->

<script type="text/javascript">

	function checkrecordform()
	{
	      var f = $('recordform');
	      f.submit();
	};
	
	function DelTreatmentAction(acid)
	{ 
		  var f = $('recordform');
		  f.submit();		  
	}
		
</script>

<!--主体-->
<div class="controlpannel">
   <%template _memmenu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _mempatientmenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if ErrorCount==0%>
					
						<%if IsPost%>
							<%template _msgbox%>
						<%else%>
								
						<p>治疗情况：&nbsp;&nbsp;&nbsp;<a href="TreatmentAction.aspx?type={Constants.PREVIOUS_USED}&tid={TreatmentId}" class="submitbutton">添加历史记录</a></p>
						<br />
						
						<form action="" method="post" id="recordform">
					       <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table1">
				                <tr>
							        <td style="width:15%">时间段</td>
							        <td style="width:10%">剂量</td>
							        <td style="width:25%">使用目的</td>
							        <td style="width:25%">停止使用原因</td>
							        <td style="width:15%">操作</td>
						        </tr>
					            <%csharp%>
					            foreach(PatientTreatmentInfo info in TreatmentHistoryList)
					            {
				                <%/csharp%>
						            <tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
						                <td>
						                    <%csharp%>if(info.State == Constants.CURRENT_USING) {<%/csharp%>
						                        {info.StartDate.ToString("yyyy-MM-dd")} - 今
						                    <%csharp%>  }else {<%/csharp%>
						                        {info.StartDate.ToString("yyyy-MM-dd")} - {info.EndDate.ToString("yyyy-MM-dd")}
						                    <%csharp%>  } <%/csharp%>
						                </td>
						                <td>{info.DataValue}{info.Unit}</td>
						                <td>{info.UsePurpose}</td>
						                <td>{info.StopReason}</td>
						                <td>
                                            <%csharp%>if(info.State == Constants.CURRENT_USING) {<%/csharp%>
						                        <a href='TreatmentAction.aspx?type={Constants.CHANGE_DOSAGE}&thid={info.Id}' >改变剂量</a>
						                        <a href='TreatmentAction.aspx?type={Constants.STOPED_USE}&thid={info.Id}' >停止使用</a>
						                    <%csharp%>  } <%/csharp%>	
						                        <a href='TreatmentRecordEdit.aspx?thid={info.Id}' >修改</a>						        
						                        <a href="#" onclick="DelTreatmentAction({info.Id});">删除</a>
						                </td>
						            </tr>
					            <%csharp%>  }<%/csharp%>							
						    </table>
					    </form>	 

						<%/if%>
						</div>
						
					<%else%>
						<%template _memerrmsgbox%>
					<%/if%>
			    </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->

<%template _copyright%>
<%template _footer%>
